local skynet = require "skynet"
local msg_center = require "common.msg_center"
local proto_manager = require "common.proto_manager"
local MessageType = require "common.message_type"
local time_manager = require "common.time_manager"
local match_manager = require "match.match_manager"
local service_helper = require "common.service_helper"

local function onPlayerOnline(open_id)
    local matchInfo = match_manager.getMatchByOpenID(open_id)
    if matchInfo then
        -- match_manager.online(open_id)
    end
end
msg_center.setDefaultMessageHandler(MessageType.OnPlayerOnline,onPlayerOnline)

local function onPlayerOffline(open_id)
    local matchInfo = match_manager.getMatchByOpenID(open_id)
    if matchInfo then
        match_manager.offline(open_id)
    end
end
msg_center.setDefaultMessageHandler(MessageType.OnPlayerOffline,onPlayerOffline)